package com.hiyee.idWorker.extend;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 雪花 id 配置文件注入类
 *
 * @author WangBin
 */
@Component
@PropertySource("classpath:snowflake.properties")
@ConfigurationProperties(prefix = "snowflake")
public class SnowflakeResource {
    private Long machineId;
    private Long dataCenterId;

    public Long getMachineId() {
        return machineId;
    }

    public void setMachineId(Long machineId) {
        this.machineId = machineId;
    }

    public Long getDataCenterId() {
        return dataCenterId;
    }

    public void setDataCenterId(Long dataCenterId) {
        this.dataCenterId = dataCenterId;
    }
}
